﻿public delegate void TimeoutArgFun<Arg>(params Arg[] args);

class TimeroutArgsVO<Arg> : TimeroutBaseVO
{
    private TimeoutArgFun<Arg> fun;
    private Arg[] args;

    public TimeroutArgsVO(TimeoutArgFun<Arg> fun, float delay, Arg[] args)
    {
        this.delay = delay;
        this.fun = fun;
        this.args = args;
    }

    public override void Destroy()
    {
        fun = null;
    }

    protected override void CallFun()
    {
        fun(args);
    }
}